#ifndef MYPUSHBUTTON_H
#define MYPUSHBUTTON_H

#include <QPushButton>
#include <QWidget>

class MyPushButton : public QPushButton
{
    Q_OBJECT
public:
    MyPushButton(QWidget *parent = nullptr);

    void setStyles(const QString& common, const QString &normal = "", const QString &checked = "") {
        _normalStyle = common + normal, _checkedStyle = common + checked;
        setStyleSheet(_normalStyle);
    }

    QString normalStyle()  const { return _normalStyle;  }
    QString checkedStyle() const { return _checkedStyle; }

    void check(bool checked) { setStyleSheet(checked ? _checkedStyle : _normalStyle); }

private:
    QString _normalStyle;
    QString _checkedStyle;
};

#endif // MYPUSHBUTTON_H
